package com.dikeleakagedetection.myapplication.logic.dao

import androidx.room.*

@Dao
interface DotDao {
    @Insert
    fun insertDot(dot: Dot): Long

    @Update
    fun updateDot(newDot: Dot)

    @Query("select * from Dot")
    fun loadAllDots(): List<Dot>

    @Query("select * from Dot where id = :id")
    fun loadDotById(id: Long): Dot?

    @Query("select * from Dot where tabletId = :tabletId")
    fun loadDotsInTablet(tabletId: Long): List<Dot>

    @Delete
    fun deleteDot(dot: Dot)
}